
const http = uni.$u.http
import config from '@/common/config.js'

//  /home/goodsTypeList/{version}  查询一级分类
const getFirstGoodsTypeList = (data) => {
	const url = `/home/goodsTypeList/v1.0`
	return http.post(url, data, {})
}

//  /home/goodsTypeSecondList/{version}  查询二级分类
const getSecondGoodsTypeList = (data) => {
	const url = `/home/goodsTypeSecondList/v1.0`
	return http.post(url, data, {})
}


//  /home/findGoodsListByType/v1.0  根据分类查商品列表
const findGoodsListByType = (data) => {
	const url = `/home/findGoodsListByType/v1.0`
	return http.post(url, data, {})
}

//  /home/findGoodsDetail//v1.0  商品详情
const findGoodsDetail = (data) => {
	const url = `/home/findGoodsDetail/v1.0`
	return http.post(url, data, {})
}



export default {
	getFirstGoodsTypeList,
	getSecondGoodsTypeList,
	findGoodsListByType,
	findGoodsDetail
}